home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / com / computer / casio_st / prog_fx / divers / fraction.sha < prev    next >
Text File  |  1994-03-01  |  262b  |  7 lines

  1. 10 REM PROGRAMME DE FRACTION
  2. 20 REM BASE DE DONNEES: WTEL 24/24 (16) 62.93.74.05
  3. 30 REM
  4. 40 Q=0:INPUT "X=";X:H=INT X:Z=FRAC X:L=1:P=1
  5. 50 IF ABS(X-H/P)<=1E-10 THEN PRINT X;"=";H;"/";P:GOTO 10
  6. 60 O=INT(1/Z):Z=FRAC(1/Z):M=H:N=P:H=O*H+L:P=O*P+Q:L=M:Q=N:GOTO 50
  7.